package tech.aistar.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tech.aistar.mapper.UserCollectionMapper;
import tech.aistar.pojo.UserCollectionVo;

import java.util.List;
@Service
public class UserCollectionServiceImpl implements UserCollectionService {
    @Autowired
    private UserCollectionMapper userCollectionMapper;
    @Override
    public List<UserCollectionVo> findByUserId(Integer userId) {
        return userCollectionMapper.findByUserId(userId);
    }
    
    @Override
    public boolean delPCollectionId(Integer collectionId) {
        System.out.println("deleteProductId:" + collectionId);
        boolean b =userCollectionMapper.delPCollectionId(collectionId);
        System.out.println(b);
        return b;
    }
    
    @Override
    public boolean delPCollectionIds(List<Integer> collectionIds) {
        return userCollectionMapper.delPCollectionIds(collectionIds);
    }
}
